package com.awesome.aidldemo.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Author: zhangjingfang
 * Email:zhangjingfang@jeejio.com
 * Date: 2022/7/1
 * Description: 下载的Bean
 */
public class DownloadBean implements Parcelable {
    private String fileName;
    private int fileSize;

    public DownloadBean(String fileName, int fileSize) {
        this.fileName = fileName;
        this.fileSize = fileSize;
    }

    protected DownloadBean(Parcel in) {
        fileName = in.readString();
        fileSize = in.readInt();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(fileName);
        dest.writeInt(fileSize);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<DownloadBean> CREATOR = new Creator<DownloadBean>() {
        @Override
        public DownloadBean createFromParcel(Parcel in) {
            return new DownloadBean(in);
        }

        @Override
        public DownloadBean[] newArray(int size) {
            return new DownloadBean[size];
        }
    };

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public int getFileSize() {
        return fileSize;
    }

    public void setFileSize(int fileSize) {
        this.fileSize = fileSize;
    }
}
